<template>
  <div class="menu-manage">
    <el-card class="box-card">
      <template #header>
        <div class="card-header">
          <span>菜单管理</span>
          <el-button type="primary" size="small">新增菜单</el-button>
        </div>
      </template>
      <el-table :data="menuData" row-key="id" :tree-props="{ children: 'children' }">
        <el-table-column prop="title" label="菜单名称" />
        <el-table-column prop="icon" label="图标" width="100" />
        <el-table-column prop="path" label="路由路径" />
        <el-table-column prop="sort" label="排序" width="80" />
        <el-table-column label="操作" width="200">
          <template #default>
            <el-button size="small" type="primary">编辑</el-button>
            <el-button size="small" type="danger">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const menuData = ref([
  {
    id: 1,
    title: '系统管理',
    icon: 'Setting',
    path: '/system',
    sort: 1,
    children: [
      {
        id: 2,
        title: '菜单管理',
        icon: 'Menu',
        path: '/system/menu',
        sort: 1
      }
    ]
  }
])
</script>

<style scoped>
.menu-manage {
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style> 